package com.changgou.common.model.response.goods;


import com.changgou.common.model.response.ResultCode;
import lombok.ToString;

@ToString
public enum GoodsCode implements ResultCode {
    GOODS_SPU_RESTORE_ERROR(false,22008,"此商品未被删除！"),
    GOODS_SPU_DELETE_ERROR(false,22007,"上架商品不能被删除！"),
    GOODS_SPU_PUT_ERROR(false,22006,"未通过审核的商品不能上架！"),
    GOODS_SPU_PULL_ERROR(false,22005,"当前商品处于删除状态"),
    GOODS_SPU_AUDIT_ERROR(false,22004,"当前商品不存在"),
    GOODS_SKU_ADD_ERROR(false,22003,"参数不能为空"),
    GOODS_BRAND_ADD_ERROR(false,22001,"商品添加失败"),
    GOODS_PAGE_ERROR(false,22002,"分页参数有误");



    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;
    private GoodsCode(boolean success,int code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }
    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }


}
